//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int price = scanner.nextInt();
        int day = 0;
        int amount = 0;

        while (amount < price) {
            day++;
            amount += day;
        }

        System.out.println("小明第" + day + "天可以达成心愿");
    }
}